﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SME.Food.Surperise.BLL;
using SME.Food.Surperise.Model;

namespace SME.Food.Tricon.Web.AdminJS.UserManege
{
    public partial class UserModify : System.Web.UI.Page
    {
        public string hid = "";
        public int id, postId;
        public string User_No = ""
            , User_Name = ""
            , User_PassWord = ""
            , Mem_No = ""
            , Mem_Name=""
            , PowerSelect = ""
            , type = "";

        Bas_User_BLL bll = new Bas_User_BLL();
        private Bas_Member_BLL Membll = new Bas_Member_BLL();

        protected void Page_Load(object sender, EventArgs e)
        {
            type = Request.QueryString["type"];
            if (type == "update")
            {
                hid = "update";
                Show();
            }
            else hid = "add";


        }

        public void Show()
        {
            User_No = Request.QueryString["User_No"];
            Bas_User_Model model = bll.GetModel(User_No);
            if (model != null)
            {
                Mem_No = model.Mem_No;
                Mem_Name = Membll.GetModel("Mem_No").Mem_Name;
                User_Name = model.User_Name;
                User_No = model.User_No;
                User_PassWord = model.User_PassWord;
                PowerSelect = model.User_PassWord;
            }
        }
    }
}